package com.tencent.iov.cowin.befsale.clue.dao.http.todo;

import com.tencent.iov.cowin.befsale.clue.dao.http.todo.request.TodoAccessRequest;
import com.tencent.iov.cowin.befsale.clue.dao.http.todo.request.TodoAccessUpdateRequest;
import com.tencent.iov.cowin.befsale.clue.value.contants.ServiceConstant;
import com.software.boot.common.entity.Response;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @describes:
 * @author: zhiye.wang
 * @created: 2022/1/21 15:11
 * @version: 1.0
 */

@FeignClient(name = ServiceConstant.SCRM_TODO_SERVICE,
        url = ServiceConstant.SCRM_TODO_HOST)
public interface IMsgTodoClient {
    String TODO_ACCESS_PREFIX = "/v1/todo/access";

    @ApiOperation("新建待办")
    @PostMapping(TODO_ACCESS_PREFIX + "/send")
    Response<Long> createTodoItem(@RequestHeader("corpId") String corpId,@RequestHeader("tenantId") String tenantId, @RequestBody @Validated TodoAccessRequest request) ;


    @ApiOperation(value = "更新待办状态", httpMethod = "POST", response = Response.class, notes = "update_status")
    @PostMapping(TODO_ACCESS_PREFIX + "/update_status")
    Response updateStatus(@RequestBody @Validated TodoAccessUpdateRequest request);
}
